# -*- coding: utf-8 -*-
from odoo import models, fields, api
from odoo.exceptions import ValidationError

class Codedep(models.Model):

    _name = 'emp.codedep'
    _rec_name = 'depname'

    depno = fields.Char()
    depname = fields.Char()
    depcname = fields.Many2one(string="自己",comodel_name='emp.codedep') #存名字
    depename = fields.Char()
    depkind = fields.Char(string='部別')
    deplevel = fields.Char(string="無名")
    upper = fields.Char(string="無名")
    printserial = fields.Char()
    depgroup = fields.Many2one(string="無名",comodel_name='emp.codedepgroup')
    isknow = fields.Boolean()
    pdepno = fields.Many2one(string="自己",comodel_name='emp.codedep') #存名字
    pdepkind = fields.Char()
    pdepnum = fields.Char()
    sday = fields.Date()
    eday = fields.Date()
    shdepno = fields.Char()
    shdepname = fields.Char()
    peodeplist = fields.Char()
    email = fields.Char()
    fulltime = fields.Char()
    partime = fields.Char()
    issumdep = fields.Boolean()
    rdepname = fields.Char()
    old_depno = fields.Char()
    fax = fields.Char()
